import Vue from 'vue'
import App from './App'
import store from './store'
import router from './router'

import request from "./utils/js/request";
import _ from "lodash";

// import dataV from "@jiaminghi/data-view";
import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en' // lang i18n

import '@/styles/index.scss' // global css
import '@/icons' // icon
import '@/permission' // permission control

Vue.prototype.$clone = (map, data, defaultValue = false) =>
  _.cloneDeepWith(map, (path) => {
    if (defaultValue === false) return _.get(data, path);
    if (typeof path === "string")
      return _.get(data, path) || (defaultValue === true ? "" : defaultValue);
    else return _.get(data, path);
  });
// Vue.use(dataV);
Vue.use(ElementUI);

Vue.prototype.$http = request;
Vue.config.productionTip = false;


new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
